package com.tuling;

import com.tuling.annotation.ZhouyuMapperScan;
import com.tuling.mybaitis_spring.MapperBedifinitionRegister;
import com.tuling.mybaitis_spring.ZhouyuFactoryBean;
import com.tuling.mybaitis_spring.mapper.UserMapper;
import com.tuling.mybaitis_spring.service.UserService;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;


/**
 * @Type SpringTest.java
 * @Desc
 * @Author wzw
 * @Date 2024/8/9 14:08
 */
@EnableAspectJAutoProxy
@EnableTransactionManagement
public class SpringTest {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
//		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext("com.tuling");
		applicationContext.register(ConfigInfo.class);
		applicationContext.refresh();

//		Object mapperBedifinitionRegister = applicationContext.getBean("mapperBedifinitionRegister", MapperBedifinitionRegister.class);
//		System.out.println(mapperBedifinitionRegister);
		UserService userService = (UserService)applicationContext.getBean("userService");
//		userService.selectUser();


//		CopyOnWriteArrayList<String> strings = new CopyOnWriteArrayList<>();
//		strings.add("cc");
//		strings.get(0);
//		ReflectiveCopyException reflectiveCopyException = new ReflectiveCopyException();
//		System.out.println(userService);
//		userService.userInfo();
//		HashMap<String,String> hashMap1 = new HashMap<String,String>();
//		hashMap1.put("sa","sa1");
//		ConcurrentHashMap<String, String> hashMap = new ConcurrentHashMap<>();
//		hashMap.put("ss","cc");
//		hashMap.get("d");
//		hashMap.computeIfAbsent("aa",);

	}
}
